package com.demo.spring.aiservice;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ChatController {

	@Autowired
	private ConsultantService consultantService;
	
	@PostMapping("/chat")
	public String chat(@RequestBody String message) {
		String result = consultantService.chat(message);
		return result;
	}
	
}
